﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QueryData;

public class SubEntity
{
    public int Id { get; set; }
    public DateTimeOffset Time { get; set; }
    public int? MainEntityId { get; set; }
    public MainEntity? MainEntity { get; set; }

    public virtual List<SubSubEntity> SubSubEntities { get; set; } = new();
    public virtual List<SubSubEntity2> SubSubEntities2 { get; set; } = new();
}

public class SubEntity2
{
    public int Id { get; set; }
    public DateTimeOffset Time { get; set; }

    public int? MainEntityId { get; set; }
    public virtual MainEntity? MainEntity { get; set; }
}

public class SubSubEntity
{
    public int Id { get; set; }
    public DateTimeOffset Time { get; set; }

    public virtual SubEntity? SubEntity { get; set; }
}

public class SubSubEntity2
{
    public int Id { get; set; }
    public DateTimeOffset Time { get; set; }

    public virtual SubEntity? SubEntity { get; set; }
}